import * as React from "react";
import type {RouteObject} from "react-router-dom";

import Home from "@/pages/Home";
import Login from '@/pages/Login';
import Admin from '@/pages/Admin';
import Index from '@/pages/Index';
import NoFoundPage from '@/pages/NoMatch/404';


let routes: RouteObject[] = [
    {
        path: "/",
        element: <Home/>,
        children: [

            {
                index: true,
                path: "/admin/:id",
                element: <Admin/>,
            },
            {path: "*", element: <NoFoundPage/>},
        ],
    },
    {
        path: "index/:id",
        element: <Index/>,
    },
    {
        path: "login",
        element: <Login/>,
    },
    {path: "*", element: <NoFoundPage/>},
];

export default routes;
